<table class="w50" style="margin-bottom: 20px;">
	<tr>
		<td>
			<a href="<?=Request::$controller?>add/" class="awesome green">+ add new subscriber</a>
		</td>
		<td>
			<a href="<?=Request::$controller?>messages/" class="awesome orange">Messages</a>
		</td>
	</tr>
</table>
<h1>Subscriber list</h1>
<? if (count($subscribers)): ?>
<table class="w100 TableWithPadding TableWithBorder" id="subscriberList">
	<thead>
		<tr>
			<th class="w25">
				Name
			</th>
			<th class="w20" filter="false">
				Email
			</th>
			<th class="w20" filter-type='ddl'>
				Confirmed
			</th>
			<th class="w10" filter="false">
				Remove
			</th>
		</tr>
	</thead>
	<tbody>
		<? foreach ($subscribers as $subscriber): ?>
			<tr <?=(($subscriber['confirmed']) ? '' : 'style="background-color: #eee; color: #999;"')?>>
				<td>
					<label for="subscriber-<?=$subscriber['id']?>">
						<?=Html::anchor(Request::$controller.'edit/' . $subscriber['id'] . '/', Html::chars($subscriber['name']))?>
					</label>
				</td>
				<td><?=Html::anchor('mailto:' . $subscriber['email'], Html::chars($subscriber['email']))?></td>
				<td><?=($subscriber['confirmed'] ? 'confirmed' : 'unconfirmed')?></td>
				<td>
					<?=Html::anchor(Request::$controller.'remove/' . $subscriber['id'] . '/', '<img src="/images/icons/remove-user.png" />', array('onclick' => 'javascript:return confirm("Are you sure?")'))?>
				</td>
			</tr>
		<? endforeach; ?>
	</tbody>
</table>
<script type="text/javascript">
	$(document).ready(function() {
		//$('#subscriberList').tableFilter({ selectOptionLabel : 'Show all' });
	});
</script>
<table class="w50">
	<tr>
		<td>
			<a href="<?=Request::$controller?>add/" class="awesome green">+ add new subscriber</a>
		</td>
		<td>
			<a href="<?=Request::$controller?>messages/" class="awesome orange">Messages</a>
		</td>
	</tr>
</table>
<? endif; ?>